package sivan.mybatis;

import org.apache.ibatis.type.JdbcType;

import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

public class ObjectTypeHandler implements TypeHandler<Object> {

    @Override
    public Object getResult(ResultSet resultSet, String columnName) throws SQLException {
        return resultSet.getObject(columnName);
    }

    @Override
    public Object getResult(ResultSet resultSet, int columnIndex) throws SQLException {
        return resultSet.getObject(columnIndex);
    }

    @Override
    public void setParameter(PreparedStatement preparedStatement, int index,
                             Object value, JdbcType jdbcType) throws SQLException {

    }
}
